package com.kotlin.beetlsql

import org.beetl.sql.core.annotatoin.SqlStatement
import org.beetl.sql.core.annotatoin.Table
import org.beetl.sql.experimental.iohao.core.ActiveRecord
import org.beetl.sql.experimental.iohao.core.MyMapper


@Table(name = "tb_bird")
class Captain : ActiveRecord {
    var id: Int = 0
    /** 年龄 */
    var age: Int = 0

    var name: String = ""


    interface Dao : MyMapper<Captain> {
        @SqlStatement(params = "age")
        fun listByAge(age: Int): List<Captain>
    }

    override fun toString(): String {
        return "Captain(id=$id, age=$age, name='$name')"
    }
}


//fun hello() {
//    var methods = Captain::class.java.declaredMethods
//
//    methods.filter { it.name == "say" }.map {
//        println(it.name)
//        it.parameters.map {
//            println(it.name)
//        }
//    }
//}
//
//fun say(age: Int, name: String) {
//
//}
